/*
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use 'sass:map';
@use '@angular/material' as mat;
@use '@gravitee/ui-particles-angular' as gio;
@use '../../../scss/gio-layout' as gio-layout;

$typography: map.get(gio.$mat-theme, typography);

:host {
  @include gio-layout.gio-responsive-content-container;
}

.integration-configuration,
.page-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  &__page-title {
    @include mat.typography-level($typography, headline-6);
    margin: 0 0 4px 0;
  }

  &__description {
    color: mat.get-color-from-palette(gio.$mat-space-palette, 'lighter40');
  }
}

.card-header {
  padding: 16px;
  border-bottom: 1px solid mat.get-color-from-palette(gio.$mat-dove-palette, 'darker20');

  &__title {
    h3 {
      @include mat.typography-level($typography, subtitle-1);
      margin: 0;
    }
  }
}

.form {
  margin: 16px 0;

  .form-field {
    width: 100%;
  }

  textarea {
    resize: none;
  }

  .hint {
    color: mat.get-color-from-palette(gio.$mat-space-palette, 'lighter40');
  }
}

.body-strong {
  @include mat.typography-level($typography, body-1);
}

.loadingTemplate {
  height: 50vh;
  display: flex;
}

.danger-card {
  border: 1px solid mat.get-color-from-palette(gio.$mat-error-palette, 'default');

  &__title {
    color: mat.get-color-from-palette(gio.$mat-error-palette, 'default');
  }

  &__actions {
    display: flex;
    flex-direction: column;

    &__action {
      display: flex;
      align-items: center;
      flex-direction: row;
      justify-content: space-between;
      height: 48px;
    }
  }
}
